package com.codedef.fservice;

import com.codedef.entity.Seat;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;


@FeignClient(value = "seatlist")
public interface SeatService {

    /**
     * 获得当前有预约记录的座位Id的列表 Feign接口
     */
    @GetMapping(value = "/seat/f/nowReservationSeatIdList/{classroomId}")
    List<Integer> getNowReservationSeatIdListByClassroomIdFeign(@PathVariable("classroomId") Integer classroomId);

    /**
     * 通过教室的ID，获取某一个教室内所有的座位 Feign接口
     */
    @GetMapping("/seat/f/classroom/{classroomId}")
    List<Seat> getSeatListByClassroomId(@PathVariable("classroomId") Integer classroomId);

    /**
     * 查询一个座位所属的教室id Feign接口
     */
    @GetMapping("/seat/f/classroomAbbr/{seatId}")
    String getClassroomAbbreviationBySeatId(@PathVariable("seatId") Integer seatId);

}
